home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
music
/
eked-m1.zoo
/
src
/
midi.h
< prev
next >
Wrap
Text File
|
1995-02-19
|
2KB
|
70 lines
/*
* EKED-M1 : Editor for Korg M1 synth; midi.h : MIDI defines
* Copyright (C) 1995 Steven M. Eker (Steven.Eker@brunel.ac.uk)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define NOTE_OFF 0x80
#define NOTE_ON 0x90
#define POLY_AT 0xA0
#define CTRL_CHG 0xB0
#define PROG_CHG 0xC0
#define CHAN_AT 0xD0
#define BENDER 0xE0
#define SYSEX 0xF0
#define MTC_QF 0xF1
#define SONG_POS 0xF2
#define SONG_SEL 0xF3
#define UNDEF1 0xF4
#define UNDEF2 0xF5
#define TUNE_REQ 0xF6
#define EOX 0xF7
#define M_CLOCK 0xF8
#define UNDEF3 0xF9
#define M_START 0xFA
#define M_CONT 0xFB
#define M_STOP 0xFC
#define UNDEF4 0xFD
#define ACT_SENSE 0xFE
#define SYS_RESET 0xFF
/*
* Midi status byte macros
*/
#define note_off(e) (((e) & 0xF0) == NOTE_OFF)
#define note_on(e) (((e) & 0xF0) == NOTE_ON)
#define poly_at(e) (((e) & 0xF0) == POLY_AT)
#define ctrl_chg(e) (((e) & 0xF0) == CTRL_CHG)
#define prog_chg(e) (((e) & 0xF0) == PROG_CHG)
#define chan_at(e) (((e) & 0xF0) == CHAN_AT)
#define bender(e) (((e) & 0xF0) == BENDER)
#define two_data_byte(e) (((e) & 0x60) != 0x40)
#define status_byte(e) (((e) & 0x80) != 0)
#define data_byte(e) (((e) & 0x80) == 0)
#define real_time(e) (((e) & 0xF8) == 0xF8)
/*
* MIDIfile meta events
*/
#define TEXT_EVENT 0x01
#define COPYRIGHT 0x02
#define TRACK_NAME 0x03
#define TRACK_END 0x2F
#define TEMPO_CHG 0x51
#define TIME_SIG 0x58